export default {
  initXmapContent(text) {
    const proto = {
      root: {
        data: {
          id: '',
          created: '',
          text: '',
        },
        children: [],
      },
      template: 'right',
      theme: 'snow',
      version: '1.4.43',
    };
    proto.root.data.id = '';
    proto.root.data.created = new Date().getTime();
    proto.root.data.text = text;
    return JSON.stringify(proto);
  },
  parseXmapContent(xmapContent) {
    return JSON.parse(xmapContent);
  },
};
